package com.cskaoyan.market.controller.wx;

import com.cskaoyan.market.service.WxCatalogService;
import com.cskaoyan.market.util.ResponseUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("wx/catalog")
public class WxCatalogController {

    @Autowired
    WxCatalogService wxCatalogService;

    @GetMapping("index")
    public Object index() {

        return ResponseUtil.ok(wxCatalogService.index());
    }
    @GetMapping("current")
    public Object current(Integer id) {

        return ResponseUtil.ok(wxCatalogService.current(id));
    }

}
